<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="easyui-1.4.4/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="easyui-1.4.4/themes/icon.css">
    <script src="easyui-1.4.4/jquery.min.js"></script>
    <script src="easyui-1.4.4/jquery.easyui.min.js"></script>
</head>
<body>
<form id="form">
    <input class="easyui-combobox" data-options="
        required:true,
		valueField: 'label',
		textField: 'value',
		onSelect:onSelect,
		data: [{
			label: 'java',
			value: 'Java'
		},{
			label: 'perl',
			value: 'Perl'
		},{
			label: 'ruby',
			value: 'Ruby'
		}]"/>


    <button onclick="return validate()">提交</button>
</form>


<script>


    function onSelect(param) {
        console.info("参数长度为: " + arguments.length);
        for (var item in arguments) {
            console.log(arguments[item]);
        }
    }
    function validate() {
        var re=$("#form").form('validate');
        if (re) {
            $.messager.show({title: '成功', msg: '成功', timeout: 2000, showType: 'slide'});
        }else{
            $.messager.show({title: '失败', msg: '失败', timeout: 2000, showType: 'slide'});
        }
        return re;
    }
</script>
</body>
</html>